//
//  DatePickerViewController.h
//  StanfordEvents
//
//  Created by Gongmyung on 7/7/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "DatePickerTableCell.h"

@protocol DatePickerViewDelegate <NSObject>
@required
- (void)setStartDate:(double)start endDate:(double)end;
- (UINavigationController *)navController;          // Return the navigation controller
@end

@interface DatePickerViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
    UIDatePicker            *datePicker;
    UITableView             *dateTableView;
    NSDate                  *date;
    double                  startDateSince1970;
    double                  endDateSince1970;
    
    bool firstTime;
    
    id <DatePickerViewDelegate>   delegate;   // weak ref
    
    int                     selected;
}

- (id) init;

@property (nonatomic, retain) UIDatePicker *datePicker;
@property (nonatomic, retain) UITableView *dateTableView;
@property (nonatomic, retain) NSDate *date;
@property (nonatomic, assign)  id <DatePickerViewDelegate> delegate;
-(IBAction)dateChanged;
@end